export function isMoreThanAnHourLater(inputTime) {
	console.log(inputTime)
	// 将输入的时间字符串转换为Date对象
	const inputDateTime = new Date(inputTime);
	// 获取当前时间
	const currentDateTime = new Date();
	// 计算一小时后的时间
	const oneHourLater = new Date(currentDateTime.getTime() + 30 * 60 * 1000);
	// 判断输入的时间是否大于半小时后的时间
	if (inputDateTime > oneHourLater) {
		return true;
	} else {
		return false;
	}
}

export function formatDateWeek(dateString) {
	if (!dateString) {
		return;
	}
	const date = new Date(dateString);
	const months = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'];
	const weekdays = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
	const month = months[date.getMonth()];
	const day = date.getDate();
	const weekday = weekdays[date.getDay()];
	return `${month}/${day} ${weekday}`;
}

export function calculateMinutesDifference(timeArray) {
	const [startTime, endTime] = timeArray;
	const [startHour, startMinute] = startTime.split(':').map(Number);
	const [endHour, endMinute] = endTime.split(':').map(Number);
	const hoursDifference = endHour - startHour;
	const minutesDifference = endMinute - startMinute;
	const totalMinutesDifference = hoursDifference * 60 + minutesDifference;
	return totalMinutesDifference;
}